<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>捷报考勤找回密码</title>

<!-- Bootstrap -->
<link href="static/plugins/bootstrap3.3.7/css/bootstrap.min.css"
	rel="stylesheet">

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
      <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
<style type="text/css">
body {
	padding-top: 40px;
	padding-bottom: 40px;
	background-color: #f5f5f5;
}

.form-signin {
	max-width: 350px;
	padding: 19px 29px 29px;
	margin: 0 auto 20px;
	background-color: #fff;
	border: 1px solid #e5e5e5;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	border-radius: 5px;
	-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.form-signin .form-signin-heading,.form-signin .checkbox {
	margin-bottom: 10px;
}

.form-signin input[type="text"],.form-signin input[type="password"] {
	font-size: 16px;
	height: auto;
	margin-bottom: 15px;
	padding: 7px 9px;
    width: 100%;
}

.form-signin-heading {
	text-align: center;
}

.login-btn {
	width: 100%;
    padding: 7px 9px;
}
    
</style>
</head>
<body>
	<div class="container">
		<div class="row">
				<form class="form-signin" id="forgetForm">
					<h2 class="form-signin-heading">捷报考勤找回密码</h2>
					<input type="text" class="input-block-level" name="telephone" id="telephone"
						placeholder="请输入手机号码"> 
					<input type="text" name="captcha" style="width: 135px;"
						class="input-block-level" placeholder="请输入验证码">
					<button class="btn btn-large btn-primary" type="button" style="width: 150px;">获取短信验证码(60s)</button>
					<br />
					<button class="btn btn-large btn-primary login-btn" type="button" onclick="">提交</button>
				</form>
		</div>
	</div>
	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
	<script src="static/plugins/jquery/jquery-1.12.4.min.js"></script>
	<!-- Include all compiled plugins (below), or include individual files as needed -->
	<script src="static/plugins/bootstrap3.3.7/js/bootstrap.min.js"></script>
</body>
<script type="text/javascript">
	function attLogin() {
		if ($("input[name='loginName']").val() == "") {
			showError("帐号不能为空，请输入");
			$("input[name='loginName']").focus();
			return;
		} 
		if($("input[name='password']").val() == "") {
			showError("密码不能为空，请输入");
			$("input[name='password']").focus();
			return;
		}
		
		//ajax异步提交  
		$.ajax({
			type : "POST",
			url : "attApi.action?login",
			data : $("#loginForm").serialize(), //序列化               
			error : function(request) { // 设置表单提交出错 
				alert('登陆错误'); //登录错误提示信息
			},
			success : function(data) {
				var d = $.parseJSON(data);
				if (d.success) {
					window.location.href='main.do?main';
				} else {
					alert(d.msg)
				}
				
			}
		});
	}
</script>
</html>